# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header:$

ETYPE="sources"
K_WANT_GENPATCHES="base extras"
K_SYMLINK=1
K_GENPATCHES_VER="11"
inherit kernel-2
detect_version
detect_arch

DEPEND="$DEPEND >=wda/wda-buildkernel-0.1"

KEYWORDS="~alpha ~amd64 arm ~hppa ia64 ~ppc ~ppc64 sparc x86"
IUSE=""
HOMEPAGE="http://dev.gentoo.org/~dsd/genpatches"

DESCRIPTION="Full sources including the Gentoo patchset for the ${KV_MAJOR}.${KV_MINOR} kernel tree"
SRC_URI="${KERNEL_URI} ${GENPATCHES_URI} ${ARCH_URI}"

src_install() {
	kernel-2_src_install
	insinto /usr/src/
	doins "$FILESDIR/config-${PVR}"

	dosym "/usr/src/config-${PVR}" "/usr/src/config" 
}

pkg_postinst() {
	kernel-2_pkg_postinst
	buildkernel
}

pkg_config() {
	einfo "Running 'buildkernel menuconfig':"
	buildkernel config
}
